package com;

import com.common.MyProperties;
import org.springframework.stereotype.Component;

import java.io.Serializable;

/**
 * 自动编码配置
 */
@Component
public class Config implements Serializable {
	private static final long serialVersionUID = 7074532446194388664L;
	//代码所在的路径
	private String WORKSPACEPROPATH;
	//具体代码所在项目路径  普通项目只要 //src 这里是maven项目所以延伸到java
	private String SRCPATH = "//src//main//java";
	private String CONTROLLER_PACKAGE = "com.main.controller";
	private String SERVICE_PACKAGE = "com.main.service";
	private String SERVICEIMPL_PACKAGE = "com.main.service.impl";
	private String DAO_PACKAGE = "com.main.dao";
	private String MAPPING_PACKAGE = "com.main.mapping";
	private String WEBSRCPATH = "//src//main//resources//templates";
	private String JSSRCPATH = "//src//main//resources//static";
	private String JSP_PACKAGE = "web-inf.jsp";

	public Config(){
		super();
	}
	public Config(MyProperties prop) {
		this.JSSRCPATH = prop.getProperty("JSSRCPATH");
		this.WORKSPACEPROPATH = prop.getProperty("WORKSPACEPROPATH");
		this.SRCPATH = prop.getProperty("SRCPATH");
		this.CONTROLLER_PACKAGE = prop.getProperty("CONTROLLER_PACKAGE");
		this.SERVICE_PACKAGE = prop.getProperty("SERVICE_PACKAGE");
		this.SERVICEIMPL_PACKAGE = prop.getProperty("SERVICEIMPL_PACKAGE");
		this.DAO_PACKAGE = prop.getProperty("DAO_PACKAGE");
		this.MAPPING_PACKAGE = prop.getProperty("MAPPING_PACKAGE");
		this.WEBSRCPATH = prop.getProperty("WEBSRCPATH");
		this.JSP_PACKAGE = prop.getProperty("JSP_PACKAGE");
	}

	/**
	 * ********************************************************************
	 *                      GETTERS && SETTERS
	 * ********************************************************************
	 * @return
	 */
	public String getJSSRCPATH() {
		return JSSRCPATH;
	}

	public void setJSSRCPATH(String JSSRCPATH) {
		this.JSSRCPATH = JSSRCPATH;
	}

	public String getWORKSPACEPROPATH() {
		return WORKSPACEPROPATH;
	}

	public void setWORKSPACEPROPATH(String WORKSPACEPROPATH) {
		this.WORKSPACEPROPATH = WORKSPACEPROPATH;
	}

	public String getSRCPATH() {
		return SRCPATH;
	}

	public void setSRCPATH(String SRCPATH) {
		this.SRCPATH = SRCPATH;
	}

	public String getCONTROLLER_PACKAGE() {
		return CONTROLLER_PACKAGE;
	}

	public void setCONTROLLER_PACKAGE(String CONTROLLER_PACKAGE) {
		this.CONTROLLER_PACKAGE = CONTROLLER_PACKAGE;
	}

	public String getSERVICE_PACKAGE() {
		return SERVICE_PACKAGE;
	}

	public void setSERVICE_PACKAGE(String SERVICE_PACKAGE) {
		this.SERVICE_PACKAGE = SERVICE_PACKAGE;
	}

	public String getSERVICEIMPL_PACKAGE() {
		return SERVICEIMPL_PACKAGE;
	}

	public void setSERVICEIMPL_PACKAGE(String SERVICEIMPL_PACKAGE) {
		this.SERVICEIMPL_PACKAGE = SERVICEIMPL_PACKAGE;
	}

	public String getDAO_PACKAGE() {
		return DAO_PACKAGE;
	}

	public void setDAO_PACKAGE(String DAO_PACKAGE) {
		this.DAO_PACKAGE = DAO_PACKAGE;
	}

	public String getMAPPING_PACKAGE() {
		return MAPPING_PACKAGE;
	}

	public void setMAPPING_PACKAGE(String MAPPING_PACKAGE) {
		this.MAPPING_PACKAGE = MAPPING_PACKAGE;
	}

	public String getWEBSRCPATH() {
		return WEBSRCPATH;
	}

	public void setWEBSRCPATH(String WEBSRCPATH) {
		this.WEBSRCPATH = WEBSRCPATH;
	}

	public String getJSP_PACKAGE() {
		return JSP_PACKAGE;
	}

	public void setJSP_PACKAGE(String JSP_PACKAGE) {
		this.JSP_PACKAGE = JSP_PACKAGE;
	}
}
